package com.googlecode.encomendaz.gui;

import com.googlecode.encomendaz.entidades.SituacaoRastreio;
import com.googlecode.encomendaz.gui.tablemodels.RastreamentoTableModel;
import java.util.List;

/**
 *
 * @author marlonsilvacarvalho
 */
public class DetalhesRastreioVisao extends javax.swing.JFrame {

    /** Creates new form DetalhesRastreioVisao */
    public DetalhesRastreioVisao(List<SituacaoRastreio> list) {
        initComponents();
        this.setResizable(false);
        tblDados.setModel(new RastreamentoTableModel(list));
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        btnSair = new javax.swing.JButton();
        scrollTblDados = new javax.swing.JScrollPane();
        tblDados = new javax.swing.JTable();

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(com.googlecode.encomendaz.RastreadorApp.class).getContext().getResourceMap(DetalhesRastreioVisao.class);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setName("Form"); // NOI18N

        btnSair.setText(resourceMap.getString("btnSair.text")); // NOI18N
        btnSair.setName("btnSair"); // NOI18N
        btnSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSairActionPerformed(evt);
            }
        });
        getContentPane().add(btnSair, java.awt.BorderLayout.PAGE_END);

        scrollTblDados.setName("scrollTblDados"); // NOI18N

        tblDados.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tblDados.setName("tblDados"); // NOI18N
        tblDados.setPreferredSize(new java.awt.Dimension(450, 64));
        tblDados.setSize(new java.awt.Dimension(450, 0));
        tblDados.setSurrendersFocusOnKeystroke(true);
        scrollTblDados.setViewportView(tblDados);

        getContentPane().add(scrollTblDados, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents

    private void btnSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSairActionPerformed
        this.setVisible(false);
        this.dispose();
}//GEN-LAST:event_btnSairActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnSair;
    private javax.swing.JScrollPane scrollTblDados;
    private javax.swing.JTable tblDados;
    // End of variables declaration//GEN-END:variables

}
